package com.zb.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @Author WEN
 * @Date 2023/7/11 0011
 **/
@Data
@ApiModel("物流实体封装")
public class LogisticsDto {
    @ApiModelProperty(value = "主健ID，新增时不必传，修改时必传")
    private Long id;

    @NotNull(message = "物流类型不能为空")
    @ApiModelProperty(value = "物流类型：1-国内、2-国外", required = true)
    private Integer type;

    @NotBlank(message = "物流名称不能为空")
    @Length(max = 30, message = "物流名称字符长度限制在30个以内")
    @ApiModelProperty(value = "物流名称", required = true)
    private String name;

    @NotBlank(message = "物流编码不能为空")
    @Length(max = 60, message = "物流编码字符长度限制在60个以内")
    @ApiModelProperty(value = "物流编码", required = true)
    private String code;

}
